package com.ruoyi.labour.controller;

import com.ruoyi.common.core.domain.R;
import com.ruoyi.labour.service.AnnouncementService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName: AnnouncementController
 * @Description:
 * @Author: Awen
 * @Date: 2023/5/16 11:40
 */
@RestController
@RequestMapping("/announcement")
@Api(tags = "平台公告管理")
public class AnnouncementController {

    @Autowired
    private AnnouncementService announcementService;

    /**
     * 修改公告信息
     * @param msg
     * @return
     */
    @ApiOperation("修改公告信息")
    @PostMapping("/updateAnnouncement")
    public R updateAnnouncement(String msg){
        return announcementService.updateAnnouncement(msg);
    }

    /**
     * 获取公告信息
     * @return
     */
    @ApiOperation("获取公告信息")
    @PostMapping("/getAnnouncement")
    public R getAnnouncement(){
        return announcementService.getAnnouncement();
    }

}
